<template>
	<view class="content">
		<view class="text mb20">
			{{imgList.content}}
		</view>
		<view class="img">
			<image @click="$preImg(imgList.img,index)" class="mb20" v-for="(item,index) in imgList.img" :key="index" :src="item" mode="widthFix"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgList:[],
				baseUrl:this.$u.baseUrl
			}
		},
		onLoad(e) {
			console.log(e.id);
			console.log(e.ids);
			this.recommendDetails(e.id)
		},
		methods: {
			async recommendDetails(id){
				const res =await this.$u.api.recommendDetails({id})
				this.imgList=res.data
				this.imgList.img=this.imgList.img.split('|')
				this.imgList.img=this.imgList.img.map(item=>{
					return this.baseUrl+item
				})
				console.log(this.imgList);
			}
		}
	}
</script>

<style>

.content{
	width: 100%;
}

.text{
	text-indent: 2em;
	margin: 20rpx;
}

.img{
	display: flex;
	flex-direction: column;
	align-items: center;
}

</style>
